package com.lib.common.bean;

import java.io.Serializable;

/**
 * 基础的响应实体
 *
 * @author FengLing
 * Created on 2017-06-22 22:47
 */
public class BaseResp implements Serializable {
    public static final int CODE_ERROR = 0xAA;
    public static final int CODE_ERROR_DATA = 0XAB;

    public static final int DATA_OK = 200;

    private String mUrl;
    private int mCode;
    private String mMsg = "Error!";
    protected String mResult;
    protected String mExtra;

    public BaseResp() {
    }

    public BaseResp(String url, int code, String msg) {
        mUrl = url;
        mCode = code;
        mMsg = msg;
    }

    public String getUrl() {
        return mUrl;
    }

    public void setUrl(String url) {
        mUrl = url;
    }

    public int getCode() {
        return mCode;
    }

    public void setCode(int code) {
        this.mCode = code;
    }

    public String getMsg() {
        return mMsg;
    }

    public void setMsg(String msg) {
        this.mMsg = msg;
    }

    public void setMessage(String msg) {
        this.mMsg = msg;
    }

    public String getResult() {
        return mResult;
    }

    public void setResult(String result) {
        this.mResult = result;
    }

    public String getExtra() {
        return mExtra;
    }

    public void setExtra(String extra) {
        mExtra = extra;
    }

    @Override
    public String toString() {
        return "BaseResp{" +
                "url=" + mUrl + "\n" +
                ", code=" + mCode + "\n" +
                ", msg=" + mMsg + '\n' +
                ", result=" + mResult + '\n' +
                '}';
    }
}